/*
============================================================================
 Name        : BengBengDbMgr.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CBengBengDbMgr declaration
============================================================================
*/

#ifndef BENGBENGDBMGR_H
#define BENGBENGDBMGR_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>

// CLASS DECLARATION
class CDbEngine;

/**
*  CBengBengDbMgr
* 
*/
class CBengBengDbMgr : public CBase
{
public: // Constructors and destructor

	/**
        * Destructor.
        */
	~CBengBengDbMgr();

        /**
        * Two-phased constructor.
        */
	static CBengBengDbMgr* NewL();

        /**
        * Two-phased constructor.
        */
	static CBengBengDbMgr* NewLC();

private:

	/**
        * Constructor for performing 1st stage construction
        */
	CBengBengDbMgr();

	/**
        * EPOC default constructor for performing 2nd stage construction
        */
	void ConstructL();

public:
	TBool CreateBengBengMessageTableL();
	TBool InsertBengBengMessageL(TInt32 aTime, const TDesC& aTitle, const TDesC& aDetailText);
	TBool QueryBengBengMessageL(TInt aNum, TDes& aTitle, HBufC* &aDetail);
	TBool DelFirstBengBengMessageL();
	TBool DelBengBengMessageL(TInt aTime = 0);
	TBool GetBengBengMessgeCount(TInt& aCount);
	TBool BengBengMessageIsExist(TInt aTime);
	TBool CBengBengDbMgr::QueryBengBengMessageTimeL(TInt aN, TInt& aTime);

private:
	CDbEngine* iDbEngine;

};

#endif // BENGBENGDBMGR_H
